package teach.aistar.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import teach.aistar.mapper.CarDetailMapper;
import teach.aistar.model.entity.CarDetail;
import teach.aistar.model.vo.AdminCarQueryVo;
import teach.aistar.service.ICarDetailService;

import java.util.List;


@Service
@Transactional
public class CarDetailServiceImpl implements ICarDetailService {
    @Autowired
    private CarDetailMapper carDetailMapper;


    @Override
    public List<CarDetail> selectByAge(int age) {
        return carDetailMapper.selectByAge(age);
    }

    @Override
    public List<CarDetail> selectAll() {
        return carDetailMapper.selectAll();
    }

    @Override
    public int insert(CarDetail carDetail) {
        return carDetailMapper.insert(carDetail);
    }

    @Override
    public int deleteById(Long id) {
        return carDetailMapper.deleteById(id);
    }

    @Override
    public List<CarDetail> findByConditional(AdminCarQueryVo adminCarQueryVo) {
        return carDetailMapper.findByConditional(adminCarQueryVo);
    }

    @Override
    public CarDetail findById(long id) {
        return carDetailMapper.findById(id);
    }

    @Override
    public int update(CarDetail carDetail) {
        return carDetailMapper.update(carDetail);
    }

}
